﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using HengTong.Model;
using HengTong.Model.Db.Hr.Bill;
using TiaoTaoHelper.Wtm.Models;


namespace HengTong.ViewModel.Daily.SysDailyLeaveRequestBillVms
{
    public partial class SysDailyLeaveRequestBillTemplateVm : BaseTemplateVM
    {
        [Display(Name = "员工工号")]
        public ExcelPropety StaffNoExcel = ExcelPropety.CreateProperty<SysDailyLeaveRequestBill>(x => x.StaffNo);
        [Display(Name = "员工姓名")]
        public ExcelPropety NameExcel = ExcelPropety.CreateProperty<SysDailyLeaveRequestBill>(x => x.Name);
        [Display(Name = "类型")]
        public ExcelPropety LeaveTypeExcel = ExcelPropety.CreateProperty<SysDailyLeaveRequestBill>(x => x.LeaveType);
        [Display(Name = "开始时间")]
        public ExcelPropety StartTimeExcel = ExcelPropety.CreateProperty<SysDailyLeaveRequestBill>(x => x.StartTime);
        [Display(Name = "结束时间")]
        public ExcelPropety EndTimeExcel = ExcelPropety.CreateProperty<SysDailyLeaveRequestBill>(x => x.EndTime);
        [Display(Name = "天数")]
        public ExcelPropety DaysExcel = ExcelPropety.CreateProperty<SysDailyLeaveRequestBill>(x => x.Days);
        [Display(Name = "审批人")]
        public ExcelPropety ApproverExcel = ExcelPropety.CreateProperty<SysDailyLeaveRequestBill>(x => x.Approver);
        [Display(Name = "审批时间")]
        public ExcelPropety ApprovalTimeExcel = ExcelPropety.CreateProperty<SysDailyLeaveRequestBill>(x => x.ApprovalTime);
        [Display(Name = "所属部门")]
        public ExcelPropety GroupExcel = ExcelPropety.CreateProperty<SysDailyLeaveRequestBill>(x => x.GroupId);
        [Display(Name = "单据编号")]
        public ExcelPropety BillCodeExcel = ExcelPropety.CreateProperty<SysDailyLeaveRequestBill>(x => x.BillCode);
        [Display(Name = "单据状态")]
        public ExcelPropety BillStatusExcel = ExcelPropety.CreateProperty<SysDailyLeaveRequestBill>(x => x.BillStatus);
        [Display(Name = "工作流状态")]
        public ExcelPropety WorkflowStatusExcel = ExcelPropety.CreateProperty<SysDailyLeaveRequestBill>(x => x.WorkflowStatus);
        [Display(Name = "备注")]
        public ExcelPropety RemarkExcel = ExcelPropety.CreateProperty<SysDailyLeaveRequestBill>(x => x.Remark);

	    protected override void InitVM()
        {
            GroupExcel.DataType = ColumnDataType.ComboBox;
            GroupExcel.ListItems = DC.Set<SysGroup>().GetSelectListItems(Wtm, y => y.GroupName);
        }

    }

    public class SysDailyLeaveRequestBillImportVm : BaseImportVM<SysDailyLeaveRequestBillTemplateVm, SysDailyLeaveRequestBill>
    {

    }

}
